from sqlalchemy import Column, String, Integer, DateTime

from server.config.database import Base


class Message(Base):
    __tablename__ = 'tb_message'

    message_id = Column(String(64), primary_key=True, comment='主键ID')
    conversation_id = Column(String(64), comment='会话ID')
    chat_type = Column(String(64), comment='会话类型')
    query = Column(String(5000), comment='问题')
    response = Column(String(5000), comment='回答')
    feedback_score = Column(Integer, comment='反馈评分')
    feedback_reason = Column(String(500), comment='反馈原因')
    create_time = Column(DateTime, comment='创建时间')
